/**
 * Alibaba.com.cn Inc.
 * Copyright (c) 2004-2021 All Rights Reserved.
 */
package com.starlink.config;

import lombok.Data;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.stereotype.Component;

/**
 * @author zhanghong
 * @version OssProperties.java, v 0.1 2023/8/8 16:52 下午 OssProperties Exp $$
 */
@Data
@Component
@ConfigurationProperties(prefix = "aliyun-oss")
public class OssProperties {
    @Value("platform")
    private String platform;
    @Value("enable-storage")
    private String enableStorage;
    @Value("access-key")
    private String accessKey;
    @Value("secret-key")
    private String secretKey;
    @Value("end-point")
    private String endPoint;
    @Value("bucket-name")
    private String bucketName;
    @Value("domain")
    private String domain;
    @Value("base-path")
    private String basePath;

    @Data
    public static class AliyunOss {
        private String accessKey;
        private String secretKey;
        private String endPoint;
        private String bucketName;
        /**
         * 访问域名
         */
        private String domain = "";
        /**
         * 启用存储
         */
        private Boolean enableStorage = false;
        /**
         * 存储平台
         */
        private String platform = "";
        /**
         * 基础路径
         */
        private String basePath = "";
    }
}
